<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8" />
	<title>Aloha Editor Remove Markup Test Suite</title>
	<!-- include qunit -->
	<link rel="stylesheet" href="../vendor/qunit.css" type="text/css"/>
	<script type="text/javascript" src="../vendor/qunit.js"></script>

	<!-- include jquery -->
	<script	src="../../lib/vendor/jquery-1.7.2.js" ></script>
	<script type="text/javascript" src="../vendor/jquery.simulate.js"></script>

	<!-- include aloha -->
	<script>
		var Aloha = {
			settings: {
				jQuery: $,
				baseUrl: '../../lib'
			}
		};
	</script>
	<script src="../../lib/require.js"></script>
	<script src="../../lib/aloha.js"></script>

	<!-- include testswarm inject script -->
	<script>
		var url = window.location.search;
		url = decodeURIComponent( url.slice( url.indexOf("swarmURL=") + 9 ) );
		if ( url && url.indexOf("http") === 0 ) {
			require(["http://testswarm.aloha-editor.org/js/inject.js?" + (new Date).getTime()], function() {});
		}
	</script>

</head>
<body>
	<!-- include the tests -->
	<script>
		// define realtive baseUrl path to requireJS
		// and paths back to aloha path
		require( [ 'remove-markup' ] );
	</script>
	<h1 id="qunit-header">Aloha Editor Remove Markup Test Suite</h1>
	<h2 id="qunit-banner"></h2>
	<div id="qunit-testrunner-toolbar"></div>
	<h2 id="qunit-userAgent"></h2>
	<ol id="qunit-tests"></ol>
	<div id="qunit-fixture">
		<!-- Reference for removing simple markup -->
		<div id="ref-remove-simple">This is <b>bold</b> text</div>
		<div id="ref-remove-simple-before">This is <b>bold</b> text</div>
		<div id="ref-remove-simple-into">This is bo<b>ld</b> text</div>
		<div id="ref-remove-simple-exact">This is bold text</div>
		<div id="ref-remove-simple-across">This is bold text</div>
		<div id="ref-remove-simple-out">This is <b>bo</b>ld text</div>
		<div id="ref-remove-simple-after">This is <b>bold</b> text</div>
		
		<!-- Reference for removing markup in paragraph -->
		<div id="ref-remove-para"><p>This is <b>bold</b> text</p></div>
		<div id="ref-remove-para-before"><p>This is <b>bold</b> text</p></div>
		<div id="ref-remove-para-into"><p>This is bo<b>ld</b> text</p></div>
		<div id="ref-remove-para-exact"><p>This is bold text</p></div>
		<div id="ref-remove-para-across"><p>This is bold text</p></div>
		<div id="ref-remove-para-out"><p>This is <b>bo</b>ld text</p></div>
		<div id="ref-remove-para-after"><p>This is <b>bold</b> text</p></div>
		
		<!-- Reference for removing markup from multiple occurrances -->
		<div id="ref-remove-multi">This is <b>bold</b> text with more <b>bold</b> text</div>
		<div id="ref-remove-multi-across">This is bold text with more bold text</div>
		<div id="ref-remove-multi-bold2bold">This is <b>bo</b>ld text with more bo<b>ld</b> text</div>
		
		<!-- Reference for removing markup from nested occurrances -->
		<div id="ref-remove-nested">This is <b>bold <i>italic</i> text</b> for testing</div>
		<div id="ref-remove-nested-inner-into">This is <b>bold ita<i>lic</i> text</b> for testing</div>
		<div id="ref-remove-nested-inner-exact">This is <b>bold italic text</b> for testing</div>
		<div id="ref-remove-nested-inner-across">This is <b>bold italic text</b> for testing</div>
		<div id="ref-remove-nested-inner-out">This is <b>bold <i>ita</i>lic text</b> for testing</div>
		<div id="ref-remove-nested-outer-into">This is bold <i>ita</i><b><i>lic</i> text</b> for testing</div>
		<div id="ref-remove-nested-outer-exact">This is bold <i>italic</i> text for testing</div>
		<div id="ref-remove-nested-outer-across">This is bold <i>italic</i> text for testing</div>
		<div id="ref-remove-nested-outer-out">This is <b>bold <i>ita</i></b><i>lic</i> text for testing</div>
	</div>
	<div id="edit" style="margin:20px; border:1px solid #000000;"></div>
</body>
</html>
